﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Silverlight.Navigation.Mapping
{
    #region EventArgs

    /// <summary>
    /// Represents the event arguments for navigating to a home menu item.
    /// </summary>
    public class HomeNavigationEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the HomeNavigationEventArgs class.
        /// </summary>
        /// <param name="home"></param>
        public HomeNavigationEventArgs(HomeMenuItem home)
        {
            if (home == null)
                throw new ArgumentNullException("home");

            this.Home = home;
        }

        /// <summary>
        /// The home menu item to navigate to.
        /// </summary>
        public HomeMenuItem Home { get; set; }
    }

    /// <summary>
    /// Represents the event arguments for navigating to a main menu item.
    /// </summary>
    public class MainMenuNavigationEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the MainMenuNavigationEventArgs class.
        /// </summary>
        /// <param name="mainMenu"></param>
        public MainMenuNavigationEventArgs(MainMenuItem mainMenu)
        {
            if (mainMenu == null)
                throw new ArgumentNullException("mainMenu");

            this.MainMenu = mainMenu;
        }

        /// <summary>
        /// The main menu to navigate to.
        /// </summary>
        public MainMenuItem MainMenu { get; set; }
    }

    /// <summary>
    /// Represents the event arguments for navigating to a sub menu item.
    /// </summary>
    public class SubMenuNavigationEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the SubMenuNavigationEventArgs class.
        /// </summary>
        /// <param name="subMenu"></param>
        public SubMenuNavigationEventArgs(SubMenuItem subMenu)
        {
            if (subMenu == null)
                throw new ArgumentNullException("subMenu");

            this.SubMenu = subMenu;
        }

        /// <summary>
        /// The sub menu to navigate to.
        /// </summary>
        public SubMenuItem SubMenu { get; set; }
    }

    #endregion

    #region Delegates

    /// <summary>
    /// Delegate for the home navigation event handler.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void HomeNavigationEventHandler(object sender, HomeNavigationEventArgs e);

    /// <summary>
    /// Delegate for the main menu navigation event handler.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void MainMenuNavigationEventHandler(object sender, MainMenuNavigationEventArgs e);

    /// <summary>
    /// Delegate for the sub menu navigation event handler.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void SubMenuNavigationEventHandler(object sender, SubMenuNavigationEventArgs e);

    #endregion
}
